package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.util.Objects;

/***
 *@ClaseName:BgMenu
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 17:53
 */
@Entity
@Table(name = "bg_menu", schema = "simpleshop", catalog = "")
public class BgMenu {
    private String id;
    private String code;
    private String name;
    private Integer sort;
    private String icon;
    private String url;
    private Integer isDelete;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Basic
    @Column(name = "icon")
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BgMenu bgMenu = (BgMenu) o;
        return Objects.equals(id, bgMenu.id) &&
                Objects.equals(code, bgMenu.code) &&
                Objects.equals(name, bgMenu.name) &&
                Objects.equals(sort, bgMenu.sort) &&
                Objects.equals(icon, bgMenu.icon) &&
                Objects.equals(url, bgMenu.url) &&
                Objects.equals(isDelete, bgMenu.isDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, code, name, sort, icon, url, isDelete);
    }
}
